/**
 * 诉讼类型
 */
export const enum LawsuitKind {
  // 诉讼立案
  LAWSUIT_RECORD = "LAWSUIT_RECORD",
  // 强制执行立案
  ENFORCE_RECORD = "ENFORCE_RECORD",
  // 仲裁
  ARBITRATE = "ARBITRATE",
}

/**
 * 诉讼步骤状态
 */
export const lawsuitStatus = {
  // 立案
  court: 'COURT',
  // 庭审
  check: 'CHECK',
  // 执行立案
  courtExecute: 'COURT_EXECUTE',
  // 案件执行中
  execution: 'EXECUTION',
  // 结案
  closingCase: 'CLOSING_CASE',
  // 执行终结
  end: 'END',
  // 撤诉
  withdrawal: 'WITHDRAWAL_PROSECUTION',
  // 参与分配
  take: 'TAKE'
}


/**
 * 诉讼类型、步骤
 */
export const lawsuitItem: any = [
  {
    kind: LawsuitKind.LAWSUIT_RECORD,
    name: '诉讼立案',
    steps: [
      {
        active: 0,
        code: lawsuitStatus.court,
        name: '立案',
        comp: 'lawsuit-follow-register',
        buttons: ['revoke', 'save', 'next'],
        viewButtons: ['next'],
      },
      {
        active: 1,
        code: lawsuitStatus.check,
        name: '庭审',
        comp: 'lawsuit-follow-trial',
        buttons: ['revoke', 'previous', 'save', 'next'],
        viewButtons: ['previous', 'next'],
      },
      {
        active: 2,
        code: lawsuitStatus.courtExecute,
        name: '执行立案',
        comp: 'lawsuit-follow-execute',
        buttons: ['previous', 'save', 'next', 'close'],
        viewButtons: ['previous', 'next'],
      },
      {
        active: 3,
        code: lawsuitStatus.execution,
        name: '案件执行中',
        comp: 'lawsuit-follow-evaluate',
        buttons: ['previous', 'save', 'end', 'allot'],
        viewButtons: ['previous', 'end', 'allot'],
      },
      {
        active: 4,
        code: lawsuitStatus.end,
        name: '执行终结',
        comp: 'lawsuit-follow-executed',
        buttons: ['previous', 'save', 'complete'],
        viewButtons: ['previous'],
      },
      {
        active: 4,
        code: lawsuitStatus.take,
        name: '参与分配',
        comp: 'lawsuit-follow-allot',
        buttons: ['previous', 'save', 'complete'],
        viewButtons: ['previous'],
      }
    ]
  },
  {
    kind: LawsuitKind.ENFORCE_RECORD,
    name: '强制执行立案',
    steps: [
      {
        active: 0,
        code: lawsuitStatus.court,
        name: '立案',
        comp: 'lawsuit-follow-register',
        buttons: ['revoke', 'save', 'next'],
        viewButtons: ['next'],
      },
      {
        active: 1,
        code: lawsuitStatus.courtExecute,
        name: '执行立案',
        comp: 'lawsuit-follow-execute',
        buttons: ['previous', 'save', 'next', 'close'],
        viewButtons: ['previous', 'next'],
      },
      {
        active: 2,
        code: lawsuitStatus.execution,
        name: '案件执行中',
        comp: 'lawsuit-follow-evaluate',
        buttons: ['previous', 'save', 'end', 'allot'],
        viewButtons: ['previous', 'end', 'allot'],
      },
      {
        active: 3,
        code: lawsuitStatus.end,
        name: '执行终结',
        comp: 'lawsuit-follow-executed',
        buttons: ['previous', 'save', 'complete'],
        viewButtons: ['previous'],
      },
      {
        active: 3,
        code: lawsuitStatus.take,
        name: '参与分配',
        comp: 'lawsuit-follow-allot',
        buttons: ['previous', 'save', 'complete'],
        viewButtons: ['previous'],
      }
    ]
  },
  {
    kind: LawsuitKind.ARBITRATE,
    name: '仲裁',
    steps: [
      {
        active: 0,
        code: lawsuitStatus.court,
        name: '立案',
        comp: 'lawsuit-follow-register',
        buttons: ['revoke', 'save', 'next'],
        viewButtons: ['next'],
      },
      {
        active: 1,
        code: lawsuitStatus.check,
        name: '庭审',
        comp: 'lawsuit-follow-trial',
        buttons: ['revoke', 'previous', 'save', 'next'],
        viewButtons: ['previous', 'next'],
      },
      {
        active: 2,
        code: lawsuitStatus.courtExecute,
        name: '执行立案',
        comp: 'lawsuit-follow-execute',
        buttons: ['previous', 'save', 'next', 'close'],
        viewButtons: ['previous', 'next'],
      },
      {
        active: 3,
        code: lawsuitStatus.execution,
        name: '案件执行中',
        comp: 'lawsuit-follow-evaluate',
        buttons: ['previous', 'save', 'end', 'allot'],
        viewButtons: ['previous','end', 'allot'],
      },
      {
        active: 4,
        code: lawsuitStatus.end,
        name: '执行终结',
        comp: 'lawsuit-follow-executed',
        buttons: ['previous', 'save', 'complete'],
        viewButtons: ['previous'],
      },
      {
        active: 4,
        code: lawsuitStatus.take,
        name: '参与分配',
        comp: 'lawsuit-follow-allot',
        buttons: ['previous', 'save', 'complete'],
        viewButtons: ['previous'],
      }
    ]
  }
]
